package com.zyiot.lbs;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.webkit.WebView;
import android.widget.Button;

import com.umeng.analytics.MobclickAgent;

public class Webview extends Activity {
	WebView webview = null;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.layout_messages_webview);
		WebView webview = (WebView) findViewById(R.id.webView);

		Intent itlist = getIntent();
		String URL = (String) itlist.getSerializableExtra("url");
		webview.getSettings().setJavaScriptEnabled(true);
		// 加载搜索结果
		webview.loadUrl(URL);
		Button webview_close = (Button) findViewById(R.id.btnback);
		webview_close.setOnClickListener(close_listener);
	}

	// 按钮监听
	private OnClickListener close_listener = new OnClickListener() {
		@Override
		public void onClick(View arg0) {
			finish();
		}
	};
	@Override
	public void onResume() {
	    super.onResume();
	    MobclickAgent.onResume(this);
	}
	@Override
	public void onPause() {
	    super.onPause();
	    MobclickAgent.onPause(this);
	}
}
